package com.design.pattern.create.factory.simple;

import com.design.pattern.entry.Fruit;

/**
 * 简单工厂测试
 *
 * @author gyf
 * @create 2018-11-30 14:29
 **/
public class SimpleFactoryClient {
    public static void main(String[] args) {
        Fruit apple = SimpleFactory.getFruit(SimpleFactory.TYPE_APPLE);
        apple.draw();
        Fruit orange = SimpleFactory.getFruit(SimpleFactory.TYPE_ORANGE);
        orange.draw();
        Fruit banana = SimpleFactory.getFruit(SimpleFactory.TYPE_BANANA);
        banana.draw();
    }
}
